package com.gxa.check.service;

import dto.ResultDTO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "user-service")
@RequestMapping("user")
public interface UserService {
    /**
     * 根据用户ID查询
     * @param memberId
     * @return
     */
    @PostMapping("get/byMemberId")
    ResultDTO findByMemberId(@RequestBody Integer memberId);
    /**
     * 根据部门ID和角色ID查询角色
     * @param deptId
     * @param roleId
     * @return
     */
    @PostMapping("find/deptId/roleId")
    ResultDTO findByDeptIdAndRoleId(@RequestParam Integer deptId, @RequestParam Integer roleId);
    /**
     * 查询总经理（根据角色ID查询，返回值只一个Member对象，不是list）
     * @return
     */
    @PostMapping("find/boss")
    ResultDTO findBoss();


    @PostMapping("find/all/byMemberId")
    ResultDTO findAllById(@RequestParam Integer memberId);
}
